//
//  PywCommonRequestHelper.h
//  PywCommonSDKDemo
//
//  Created by Ampaw on 2017/8/10.
//  Copyright © 2017年 Ampaw. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "PywCommonClientConst.h"

/// 聚合SDK请求完成回调
typedef void (^CommonSDKRequestComplete)(NSDictionary *dict);

@interface PywCommonRequestHelper : NSObject

/**
 请求固定文件地址
 
 @param urlStr 请求地址
 @param success 成功回调
 @param failer 失败回调
 */
+ (void)requestApiForSdkUrl:(NSString*)urlStr
                    success:(void (^)(NSDictionary *dict))success
                     failer:(void (^)(NSError *error))failer;

/**
 聚合请求接口封装
 
 @param params 请求参数
 @param baseUrl 基本域名地址
 @param requestMethod 接口方法名
 @param complete 回调
 */
+(void)requestWithParams:(NSDictionary *)params
          requestBaseUrl:(NSString *)baseUrl
           requestMethod:(NSString *)requestMethod
                complete:(CommonSDKRequestComplete)complete;

@end
